Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: support module-definition plugin #835

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

mujinhuakai
Copy link
Contributor

@mujinhuakai mujinhuakai commented Jun 5, 2023

Description of your changes

support definition plugin

we can write a module-definition plugin and enabled
image

and then we can see it override the default module-definition properties editor form
image

the plugin implementation demo is to reference https://github.com/mujinhuakai/velaux-plugin-topology/tree/main

Fixes #

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run yarn lint to ensure the frontend changes are ready for review.
  • Run make reviewableto ensure the server changes are ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

Special notes for your reviewer

@mujinhuakai mujinhuakai changed the title Feat: support plugin definition plugin Feat: support module-definition plugin Jun 5, 2023
@codecov
Copy link

codecov bot commented Jun 5, 2023

Codecov Report

Patch coverage has no change and project coverage change: -2.01 ⚠️

Comparison is base (d2ecefa) 60.91% compared to head (6899d4c) 58.91%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #835      +/-   ##
==========================================
- Coverage   60.91%   58.91%   -2.01%     
==========================================
  Files         109      114       +5     
  Lines       19375    19819     +444     
==========================================
- Hits        11803    11676     -127     
- Misses       6104     6703     +599     
+ Partials     1468     1440      -28     
Flag Coverage Δ
apiserver-unittests 32.15% <ø> (-1.68%) ⬇️
server-e2e-tests 48.32% <0.00%> (-0.92%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/plugin/types/plugin.go 40.00% <ø> (ø)
pkg/server/interfaces/api/assembler/v1/do2dto.go 87.30% <0.00%> (-0.34%) ⬇️
pkg/server/interfaces/api/dto/v1/types.go 73.33% <ø> (ø)

... and 29 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@chivalryq chivalryq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some implementation problems, but before that, can you show the screenshots for what this plugin looks like?

@mujinhuakai mujinhuakai requested a review from chivalryq June 6, 2023 02:37
Copy link
Member

@chivalryq chivalryq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you are providing a framework user can continue to develop a kind of plugin, which will override the specified definition properties form?

Copy link
Member

@chivalryq chivalryq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you are providing a framework user can continue to develop a kind of plugin, which will override the specified definition properties form?

@mujinhuakai
Copy link
Contributor Author

Seems like you are providing a framework user can continue to develop a kind of plugin, which will override the specified definition properties form?

Yes, user can write plugin to override component\trait\policy\workflow-step properties form

@chivalryq
Copy link
Member

I have seen lot's of duplicated code of the "definition" plugin and original plugin. We can implement that by add some fields to that.
Also you can link your implementation references (Tolology Policy) to this PR.

@mujinhuakai mujinhuakai closed this Jun 6, 2023
@mujinhuakai mujinhuakai reopened this Jun 6, 2023
@mujinhuakai
Copy link
Contributor Author

I have seen lot's of duplicated code of the "definition" plugin and original plugin. We can implement that by add some fields to that. Also you can link your implementation references (Tolology Policy) to this PR.

Point 2, Do you mean commit the code of topology-policy plugin as a demo plugin ?

@chivalryq
Copy link
Member

I have seen lot's of duplicated code of the "definition" plugin and original plugin. We can implement that by add some fields to that. Also you can link your implementation references (Tolology Policy) to this PR.

Point 2, Do you mean commit the code of topology-policy plugin as a demo plugin ?

I mean you can attach the implementation at introductio and seems you have done that.

liyanfang added 3 commits June 26, 2023 18:11
Signed-off-by: liyanfang <[email protected]>
@mujinhuakai mujinhuakai requested a review from chivalryq June 30, 2023 01:54
Signed-off-by: liyanfang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants